/*
 *  Scalar.h
 *  T3nsors
 *
 *  Created by Michael Barriault on 10-09-23.
 *  Copyright 2010 MikBarr Studios. All rights reserved.
 *
 */

#pragma once

#include <T3nsors/Domain.h>
#include <string>
#include <cmath>

namespace T3 {
	class Scalar {
	private:
		std::vector<real> T;
	public:
		std::string id;
		T3::Domain O;
		Scalar(std::string iid="");
		Scalar(Domain,std::string iid="");
		real& operator[](int);
		real& operator()(int,...);
		Scalar& operator=(real);
		Scalar& operator+=(Scalar&);
		operator real();
	};
}

T3::Scalar operator-(T3::Scalar);
T3::Scalar operator+(T3::Scalar, T3::Scalar);
T3::Scalar operator-(T3::Scalar, T3::Scalar);
T3::Scalar operator*(T3::Scalar, T3::Scalar);
T3::Scalar operator/(T3::Scalar, T3::Scalar);
T3::Scalar operator^(T3::Scalar, T3::Scalar);
T3::Scalar operator+(T3::Scalar, real);
T3::Scalar operator-(T3::Scalar, real);
T3::Scalar operator*(T3::Scalar, real);
T3::Scalar operator/(T3::Scalar, real);
T3::Scalar operator^(T3::Scalar, real);
T3::Scalar operator+(real, T3::Scalar);
T3::Scalar operator-(real, T3::Scalar);
T3::Scalar operator*(real, T3::Scalar);
T3::Scalar operator/(real, T3::Scalar);
T3::Scalar operator^(real, T3::Scalar);
T3::Scalar sin(T3::Scalar);
T3::Scalar cos(T3::Scalar);
T3::Scalar sin2(T3::Scalar);
T3::Scalar sqrt(T3::Scalar);
T3::Scalar log(T3::Scalar, real b=M_E);
real l2(T3::Scalar,real p=2.);
real max(T3::Scalar);
T3::Scalar LinCom(real,T3::Scalar,real,T3::Scalar,std::string id="");
T3::Scalar LinCom(real,T3::Scalar,real,T3::Scalar,real,T3::Scalar,std::string id="");
T3::Scalar LinCom(real,T3::Scalar,real,T3::Scalar,real,T3::Scalar,real,T3::Scalar,std::string id="");
T3::Scalar LinCom(real,T3::Scalar,real,T3::Scalar,real,T3::Scalar,real,T3::Scalar,real,T3::Scalar,std::string id="");
T3::Scalar smoother(T3::Scalar, real);
